{ ***  cef_frame_capi.h  *** }

  PCefFrame = ^TCefFrame;
  // Because circular reference in header files
  PCefV8Context = ^TCefV8Context;
  

  // Structure used to represent a frame in the browser window. When used in the
  // browser process the functions of this structure may be called on any thread
  // unless otherwise indicated in the comments. When used in the render process
  // the functions of this structure may only be called on the main thread.
  TCefFrame = record
    // Base structure.
    base: TCefBase;

    // True if this object is currently attached to a valid frame.
    is_valid: function(self: PCefFrame): Integer; cconv;

    // Execute undo in this frame.
    undo: procedure(self: PCefFrame); cconv;

    // Execute redo in this frame.
    redo: procedure(self: PCefFrame); cconv;

    // Execute cut in this frame.
    cut: procedure(self: PCefFrame); cconv;

    // Execute copy in this frame.
    copy: procedure(self: PCefFrame); cconv;

    // Execute paste in this frame.
    paste: procedure(self: PCefFrame); cconv;

    // Execute delete in this frame.
    del: procedure(self: PCefFrame); cconv;

    // Execute select all in this frame.
    select_all: procedure(self: PCefFrame); cconv;

    // Save this frame's HTML source to a temporary file and open it in the
    // default text viewing application. This function can only be called from the
    // browser process.
    view_source: procedure(self: PCefFrame); cconv;

    // Retrieve this frame's HTML source as a string sent to the specified
    // visitor.
    get_source: procedure(self: PCefFrame; visitor: PCefStringVisitor); cconv;

    // Retrieve this frame's display text as a string sent to the specified
    // visitor.
    get_text: procedure(self: PCefFrame; visitor: PCefStringVisitor); cconv;

    // Load the request represented by the |request| object.
    load_request: procedure(self: PCefFrame; request: PCefRequest); cconv;

    // Load the specified |url|.
    load_url: procedure(self: PCefFrame; const url: PCefString); cconv;

    // Load the contents of |string_val| with the specified dummy |url|. |url|
    // should have a standard scheme (for example, http scheme) or behaviors like
    // link clicks and web security restrictions may not behave as expected.
    load_string: procedure(self: PCefFrame; const stringVal, url: PCefString); cconv;

    // Execute a string of JavaScript code in this frame. The |script_url|
    // parameter is the URL where the script in question can be found, if any. The
    // renderer may request this URL to show the developer the source of the
    // error.  The |start_line| parameter is the base line number to use for error
    // reporting.
    execute_java_script: procedure(self: PCefFrame; const code,
      script_url: PCefString; start_line: Integer); cconv;

    // Returns true (1) if this is the main (top-level) frame.
    is_main: function(self: PCefFrame): Integer; cconv;

    // Returns true (1) if this is the focused frame.
    is_focused: function(self: PCefFrame): Integer; cconv;

    // Returns the name for this frame. If the frame has an assigned name (for
    // example, set via the iframe "name" attribute) then that value will be
    // returned. Otherwise a unique name will be constructed based on the frame
    // parent hierarchy. The main (top-level) frame will always have an NULL name
    // value.
    //
    // The resulting string must be freed by calling cef_string_userfree_free().
    get_name: function(self: PCefFrame): PCefStringUserFree; cconv;

    // Returns the globally unique identifier for this frame.
    get_identifier: function(self: PCefFrame): Int64; cconv;

    // Returns the parent of this frame or NULL if this is the main (top-level)
    // frame.
    get_parent: function(self: PCefFrame): PCefFrame; cconv;

    // Returns the URL currently loaded in this frame.
    //
    // The resulting string must be freed by calling cef_string_userfree_free().
    get_url: function(self: PCefFrame): PCefStringUserFree; cconv;

    // Returns the browser that this frame belongs to.
    get_browser: function(self: PCefFrame): PCefBrowser; cconv;

    // Get the V8 context associated with the frame. This function can only be
    // called from the render process.
    get_v8context: function(self: PCefFrame): PCefv8Context; cconv;

    // Visit the DOM document. This function can only be called from the render
    // process.
    visit_dom: procedure(self: PCefFrame; visitor: PCefDomVisitor); cconv;
  end;


